@extends('Agent.temple')
@section('content')
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>
        <a  style="text-decoration:none" href="{{ route('index') }}">首页 <span class="c-gray en"></a>&gt;
        </span> 用户任务管理 <span class="c-gray en">&gt;
        </span> 用户领取任务管理
        {{--<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a--}}
    </nav>
    <div class="page-container" id="app">
        {{ csrf_field() }}
        <input id="change_url" value="{{ route('changestatus') }}" type="hidden"/>
        <form action="" method="post">
            <div class="cl pd-5 bg-1 bk-gray mt-20">
                    {{--<span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a></span>--}}
            <span class="text-c">
                    <select style="width:120px;" name="status" class="input-text">
                        <option value="0">--领取状态--</option>
                        <option value="2"
                            @if (!empty($_POST['status'])&&$_POST['status']==2)
                                    selected
                            @endif
                        >待提交预约</option>
                        <option value="3"
                                @if (!empty($_POST['status'])&&$_POST['status']==3)
                                selected
                                @endif>已提交预约</option>
                        <option value="4"
                                @if (!empty($_POST['status'])&&$_POST['status']==4)
                                selected
                                @endif>已领取</option>
                        {{--<option value="1"--}}
                                {{--@if (!empty($_POST['status'])&&$_POST['status']==1)--}}
                                {{--selected--}}
                                {{--@endif>作废</option>--}}
                    </select>
                    <input
                            value="@if (isset($_POST['key'])){{ $_POST['key'] }}@endif"
                            type="text" name="key" placeholder="申请人账号" style="width:250px" class="input-text">
                    <input
                        value="@if (isset($_POST['name'])){{ $_POST['name'] }}@endif"
                        type="text" name="name" placeholder="真实姓名" style="width:250px" class="input-text">
                    <button name="" id="search" class="btn btn-success" type="submit"><i class="Hui-iconfont"></i> 搜索</button>
            </span>
            <span class="r">共有数据：<strong>
                    {{$applyList->total()}}
                </strong> 条</span> </div>
        </form>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-sort">
                <thead>
                <tr class="text-c">
                    {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
                    <th width="100">申请人账号</th>
                    <th width="100">申请手机型号</th>
                    <th width="50">推荐的vip数</th>
                    <th width="50">推荐的真实vip数</th>
                    <th width="50">真实姓名</th>
                    <th width="120">身份证号</th>
                    <th width="100">申请时间</th>
                    {{--<th width="100">信用卡号</th>--}}
                    <th width="100">是否已领取</th>
                    <th width="100">预约取手机时间</th>
                    <th width="50">设置领取状态</th>
                    <th width="50">申请资料编辑</th>
                    <th width="50">推荐的vip购买套餐详情</th>
                    <th width="50">用户申请进度</th>
                    <th width="50">任务完成明细</th>
                    <th width="25">作废</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($applyList as $v)
                    <tr class="text-c" >
                        {{--<td>{{ $k }}</td>--}}
                        {{--<td>{{ $v->node_id }}</td>--}}
                        <td width="100">{{ $v->nodecode }}</td>
                        <td width="100">{{ $v->title }}({{ $v->color }})</td>
                        <td width="50">{{ $v->vipnum }}</td>
                        <td width="50">{{ $v->realvipnum }}</td>
                        <td width="50">{{ $v->realname }}</td>
                        <td width="120">{{ $v->id_card }}</td>
                        <td width="100" style="width:15px;">{{ $v->create_time }}</td>
                        {{--<td width="100" style="width:15px;">{{ $v->credit_card }}</td>--}}
                        <td width="100">
                            @if ($v->status == 0)
                                作废
                            @elseif ($v->status == 1)
                                待提交预约
                            @elseif ($v->status == 2)
                                已提交预约
                            @elseif ($v->status == 3)
                                已领取
                            @elseid ($v->status == 4)
                                已完成
                            @endif
                        </td>
                        <td width="100">{{ empty($v->expect_time)?'暂无':$v->expect_time }}</td>
                        <td width="50" class="f-14 product-brand-manage">
                            {{--@if ($v->status  == 2)--}}
                                <a class="edit" tip="{{ $v->id }}"  style="text-decoration:none" href="javascript:;" title="设置已领取">发放手机</a>
                            {{--@endif--}}
                        </td>
                        <td width="50">
                            <a style="text-decoration:none" href="{{ url('Apply/detail') }}?id={{$v->id}}"><i class="Hui-iconfont"></i></a>
                        </td>
                        <td width="50">
                            <a style="text-decoration:none" href="{{ url('Apply/order/detail') }}?node_id={{$v->node_id}}&nodecode={{$v->nodecode}}"><i class="Hui-iconfont">查看</i></a>
                        </td>
                        <td width="50">
                            <a style="text-decoration:none" href="{{ url('Apply/schedule/detail') }}?node_id={{$v->node_id}}&nodecode={{$v->nodecode}}&mobile_id={{$v->mobile_id}}&mobile_title={{ $v->title }}({{ $v->color }})"><i class="Hui-iconfont">查看</i></a>
                        </td>
                        <td width="50">
                            <a style="text-decoration:none" href="{{ url('Apply/task/detail') }}?node_id={{$v->node_id}}&nodecode={{$v->nodecode}}"><i class="Hui-iconfont">查看</i></a>
                        </td>
                        <td  width="25">
                            @if ($v->status  != 3)
                                <a style="text-decoration:none" class="ml-5 del" href="javascript:;"  url="{{ url('Apply/delete') }}" apply_id="{{$v->id}}" title="删除"><i class="Hui-iconfont"></i></a>
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            @if (!empty($applyList))
                <div id="page">
                    {{$applyList->links()}}
                </div>
            @endif
        </div>
    </div>
@endsection
<script type="text/javascript" src="{{asset('/js/jquery/1.9.1/jquery.min.js')}}"></script>
<script src="{{asset('/js/public.js')}}"></script>
<script src="{{asset('/js/global.js')}}"></script>
<script src="{{asset('/js/agent/apply.list.js')}}"></script>



